package com.ruoyi.project.system.customer.mapper

import java.util

import com.ruoyi.project.system.customer.domain.Customer
import org.apache.poi.ss.formula.functions.T
import org.springframework.stereotype.Repository

/**
 * 客户Mapper接口
 *
 * @author daixiang
 * @date 2022-04-15
 */
@Repository
trait CustomerMapper {

  /**
   * 查询客户
   *
   * @param customerNo 客户主键
   * @return 客户
   */
  def selectCustomerById(customerNo: String): Customer

  /**
   * 查询客户
   *
   * @param customerNo 客户主键
   * @return 客户
   */
  def selectCustomerByCustomerNo(customerNo: String): Customer

  /**
   * 查询客户列表
   *
   * @param customer 客户
   * @return 客户集合
   */
  def selectCustomerList(customer: Customer): util.List[Customer]

  /**
   * 新增客户
   *
   * @param customer 客户
   * @return 结果
   */
  def insertCustomer(customer: Customer): Int

  /**
   * 修改客户
   *
   * @param customer 客户
   * @return 结果
   */
  def updateCustomer(customer: Customer): Int

  /**
   * 删除客户
   *
   * @param customerNo 客户主键
   * @return 结果
   */
  def deleteCustomerByCustomerNo(customerNo: String): Int

  /**
   * 批量删除客户
   *
   * @param customerNos 需要删除的数据主键集合
   * @return 结果
   */
  def deleteCustomerByCustomerNos(customerNos: Array[String]): Int

  def countAll(requset: Customer): Integer

  def selectAll(request: Customer): util.ArrayList[Customer]
}
